﻿using System;
using System.Web.Mvc;

namespace ThunderJob.Controllers.Binders
{
    public class UserIdentityModelBinder : IModelBinder
    {
        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            if (controllerContext == null)
                throw new ArgumentNullException("controllerContext");

            return controllerContext.HttpContext.User.Identity;
        }
    }
}
